/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nc.kyiv.yellow.sociallibrary.POJO;

import java.util.Date;
import java.util.Map;

/**
 *
 * @author Yellow Team
 */
public class LibUser {

    private String pass;
    private String login;
    private String firstName;
    private String lastName;
    private String email;
    private String regDate;
    private Date birthDate;
    private int role;
    private int status;
    private int gender;
    private int id;
    private String stringGender;

    public LibUser(String pass, String login, String firstName, String lastName, String email) {
        this.pass = pass;
        this.login = login;
        this.firstName = firstName;
        this.lastName = lastName;
        this.email = email;
    }

    public LibUser(String login, String firstName, String pass) {
        this.login = login;
        this.firstName = firstName;
        this.pass = pass;
    }

    public LibUser(String login, String firstName, String pass,
            String lastname, String email, Date bdate) {
        this.login = login;
        this.firstName = firstName;
        this.pass = pass;
        this.lastName = lastname;
        this.email = email;
        this.birthDate = bdate;
    }

    public LibUser(Map userInfo, String[] mapKeys) {
        this.login = userInfo.get(mapKeys[0]).toString();
        this.pass = userInfo.get(mapKeys[1]).toString();
        this.firstName = userInfo.get(mapKeys[2]).toString();
        this.lastName = userInfo.get(mapKeys[3]).toString();
        this.email = userInfo.get(mapKeys[4]).toString();
       // this.birthDate = userInfo.get(mapKeys[5]).toString();
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass;
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getRegDate() {
        return regDate;
    }

    public void setRegDate(String regDate) {
        this.regDate = regDate;
    }

    public int getRole() {
        return role;
    }

    public void setRole(int role) {
        this.role = role;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getGender() {
        return gender;
    }

    public void setGender(int gender) {
        this.gender = gender;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Date getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    public String getStringGender() {
        switch(getGender()){
            case 0: stringGender = "undefined"; 
                break;
            case 1: stringGender = "female"; 
                break;
            case 2: stringGender = "male"; 
                break;
        }
        return stringGender;
    }
}
